package com.shop.service;

import com.shop.dao.RegisterDAO;
import com.shop.dao.StudentDAO;

public class RegisterService implements IRegisterService{
    private RegisterDAO registerDAO = new RegisterDAO();
    private StudentDAO studentDAO = new StudentDAO();
    public Boolean register(String studentId,String phone,String password) {
        //判断学号和手机号是否已经存在
        if(studentDAO.search(studentId, phone)==null){
            registerDAO.register(studentId,phone,password);
            return true;
        }else {
            return false;
        }
    }
}
